package a.f.l.a;

import a.c.ab;
import a.c.d;
import a.c.e;
import a.c.m;
import a.c.q;
import a.c.x;
import a.c.z;

import java.util.Collections;
import java.util.Comparator;
import java.util.Iterator;
import java.util.List;

class nc
{
  private boolean a = true;
  private final i b;
  private final boolean c;
  private final cb d;
  private static final double e = 1.0E-006D;
  private q f;
  private x g;
  private e[] h;
  private qb i;
  private double[] j;
  private final d_ k;
  
  nc(i parami, qb paramqb)
  {
    this.b = parami;
    this.i = paramqb;
    this.c = parami.d();
    this.d = paramqb.c().m();
    this.k = new d_();
  }
  
  public boolean a()
  {
    return this.a;
  }
  
  public void a(boolean paramBoolean)
  {
    this.a = paramBoolean;
  }
  
  public f_ b()
  {
    boolean bool = sb.e;
    int i2 = sb.d;
    List localList = this.b.e();
    Object localObject = b(false);
    int m = 1;
    label29:
    label67:
    label119:
    do
    {
      do
      {
        if (!((f_)localObject).a()) {
          break;
        }
        break label67;
        Iterator localIterator;
        do
        {
          do
          {
            int n;
            int i1;
            do
            {
              if ((!bool) && (m == 0)) {
                break label386;
              }
              m = 0;
              localIterator = ((f_)localObject).d.iterator();
              localb_ = (b_)localIterator.next();
              for (;;)
              {
                if (localb_ != null)
                {
                  break label119;
                  break label119;
                  if (i2 != 0) {
                    break;
                  }
                  if (!localb_.a())
                  {
                    localb_ = (bool) || (localIterator.hasNext()) ? (b_)localIterator.next() : null;
                    if (i2 != 0) {
                      break label322;
                    }
                  }
                }
              }
              if (bool) {
                break label29;
              }
              if (localb_ == null) {
                break;
              }
              n = 0;
              i1 = 0;
            } while (bool);
            if (!bool)
            {
              if (localb_.d < 0)
              {
                n = localb_.a;
                if (bool) {
                  break label217;
                }
                i1 = localb_.b;
                if (i2 == 0) {
                  break label209;
                }
              }
              if (bool) {
                break label217;
              }
            }
            do
            {
              if (localb_.c < localb_.d)
              {
                n = localb_.c;
                i1 = localb_.d;
              }
              f localf1 = (f)localList.remove(n);
              localList.add(i1, localf1);
              f_ localf_ = b(false);
              if (!bool) {
                if (localf_.a((f_)localObject))
                {
                  if (bool) {
                    break label276;
                  }
                  localObject = localf_;
                  m = 1;
                  if (i2 == 0) {
                    break;
                  }
                }
              }
              f localf2 = (f)localList.remove(i1);
              localList.add(n, localf2);
              localb_ = (bool) || (localIterator.hasNext()) ? (b_)localIterator.next() : null;
              if (localb_ == null) {
                break label29;
              }
            } while (bool);
          } while ((i2 != 0) || (i2 != 0));
        } while (localb_.a());
        b_ localb_ = (bool) || (localIterator.hasNext()) ? (b_)localIterator.next() : null;
      } while (i2 == 0);
    } while (bool);
    label209:
    label217:
    return localObject;
  }
  
  private f_ b(boolean paramBoolean)
  {
    boolean bool = sb.e;
    c();
    e();
    f_ localf_1 = a(null, false, false);
    if (!bool) {
      if (localf_1.d.size() != 0) {
        return localf_1;
      }
    }
    f_ localf_2 = a(null, false, true);
    if (!bool) {
      if (localf_2.b())
      {
        if (paramBoolean) {
          return localf_1;
        }
        return localf_2;
      }
    }
    f_ localf_3 = a(null, true, true);
    if (this.d != null)
    {
      if (bool) {
        break label132;
      }
      if (!localf_3.b()) {}
    }
    else
    {
      if (!bool)
      {
        if (paramBoolean) {
          if (bool) {
            break label121;
          }
        }
      }
      else if (localf_3.b()) {
        return localf_2;
      }
      label121:
      return localf_3;
    }
    label132:
    f_ localf_4 = a(this.d, true, true);
    if (!bool)
    {
      if (paramBoolean) {
        if (bool) {
          break label161;
        }
      }
    }
    else if (localf_4.b()) {
      return localf_3;
    }
    label161:
    return localf_4;
  }
  
  private f_ a(cb paramcb, boolean paramBoolean1, boolean paramBoolean2)
  {
    boolean bool2 = sb.e;
    int i1 = sb.d;
    c_[] arrayOfc_ = new c_[this.b.c()];
    int m = 0;
    boolean bool1 = false;
    z localz = new z();
    double[] arrayOfDouble = new double[this.b.c()];
    boolean[] arrayOfBoolean = new boolean[this.b.c()];
    int n = 0;
    do
    {
      if (n >= this.b.c()) {
        break;
      }
      localObject = a(n, arrayOfDouble, paramcb, paramBoolean1, paramBoolean2, this.k);
      arrayOfDouble[n] = ((c_)localObject).j();
      arrayOfBoolean[n] = ((c_)localObject).i();
      arrayOfc_[n] = localObject;
      m += ((c_)localObject).h();
      if (i1 != 0) {
        break label203;
      }
      if (((c_)localObject).a()) {
        bool1 = true;
      }
      if (!bool2)
      {
        if (a((c_)localObject, paramcb, paramBoolean1, paramBoolean2))
        {
          b_ localb_ = a(n, arrayOfDouble, arrayOfBoolean, paramcb, paramBoolean1, paramBoolean2, ((c_)localObject).h());
          localz.add(localb_);
        }
        n++;
      }
    } while (i1 == 0);
    label203:
    if (!bool2) {}
    n = paramcb != null ? 2 : !paramBoolean1 ? 1 : (!bool2) && (!paramBoolean2) ? 0 : 3;
    Object localObject = new f_(arrayOfc_, n, m, bool1, localz);
    return localObject;
  }
  
  private boolean a(c_ paramc_, cb paramcb, boolean paramBoolean1, boolean paramBoolean2)
  {
    boolean bool = sb.e;
    if (!bool) {
      if (paramc_.a()) {
        return true;
      }
    }
    if (!bool) {
      if (!paramc_.g())
      {
        if (!bool) {
          if (paramc_.f())
          {
            if (paramcb == null) {
              break label102;
            }
            if (bool) {
              break label103;
            }
            if (paramc_.c()) {
              break label102;
            }
          }
        }
        if (!bool) {
          if (paramc_.e())
          {
            if (bool) {
              break label103;
            }
            if (!paramBoolean1) {
              break label102;
            }
          }
        }
        if (bool) {
          break label105;
        }
        if (!paramc_.d()) {
          break label104;
        }
        if (bool) {
          break label105;
        }
        if (paramBoolean2) {
          break label104;
        }
      }
    }
    label102:
    label103:
    return false;
    label104:
    label105:
    return true;
  }
  
  private b_ a(int paramInt1, double[] paramArrayOfDouble, boolean[] paramArrayOfBoolean, cb paramcb, boolean paramBoolean1, boolean paramBoolean2, int paramInt2)
  {
    boolean bool = sb.e;
    int i4 = sb.d;
    f localf = this.b.a(paramInt1);
    eb localeb = localf.c();
    int m = paramInt1;
    int n = 0;
    do
    {
      while (i4 == 0)
      {
        if (n >= paramInt1) {
          break;
        }
        if (i4 != 0) {
          break label85;
        }
        if (paramArrayOfDouble[n] >= localeb.b())
        {
          m = n;
          if (!bool) {
            if (i4 == 0) {
              break;
            }
          }
        }
        else
        {
          n++;
        }
      }
    } while (bool);
    label85:
    e_ locale_1 = 0;
    n = m;
    Object localObject;
    do
    {
      if (n < 1) {
        break;
      }
      locale_2 = new e_(paramInt1, n);
      localObject = a(n, paramArrayOfDouble, paramcb, paramBoolean1, paramBoolean2, locale_2);
      if ((!bool) && (i4 != 0)) {
        break label220;
      }
      if (((c_)localObject).h() > paramInt2)
      {
        locale_1 = n;
        if ((!bool) && (((c_)localObject).i())) {
          break;
        }
        i3 = n - 1;
        do
        {
          if (i3 < 0) {
            break;
          }
          locale_1 = i3;
          if (i4 != 0) {
            break label220;
          }
          if (paramArrayOfBoolean[i3] != 0) {
            break;
          }
          i3--;
        } while (i4 == 0);
      }
      n--;
    } while ((!bool) && (i4 == 0));
    label220:
    e_ locale_2 = locale_1;
    do
    {
      do
      {
        if (locale_2 > n) {
          break;
        }
        localObject = new e_(paramInt1, locale_2);
        if (i4 != 0) {
          break label304;
        }
        if (a(paramArrayOfDouble, locale_2, paramInt1, paramcb, paramBoolean1, paramBoolean2, (d_)localObject) > a(paramArrayOfDouble, locale_2, paramInt1, paramcb, paramBoolean1, paramBoolean2, this.k)) {
          break;
        }
        locale_2++;
      } while (i4 == 0);
    } while (bool);
    label304:
    int i1;
    if (locale_2 > n) {
      i1 = -1;
    }
    int i2 = a(paramArrayOfDouble, locale_1, paramInt1, paramcb, paramBoolean1, paramBoolean2, this.k);
    int i3 = locale_1 + 1;
    do
    {
      do
      {
        if (i3 > paramInt1) {
          break;
        }
        e_ locale_3 = new e_(locale_1, i3);
        if (i4 != 0) {
          break label401;
        }
        if (a(paramArrayOfDouble, locale_1, paramInt1, paramcb, paramBoolean1, paramBoolean2, locale_3) > i2) {
          break;
        }
        i3++;
      } while (i4 == 0);
    } while (bool);
    if (i3 > paramInt1) {
      label401:
      i3 = -1;
    }
    return new b_(paramInt1, i1, locale_1, i3);
  }
  
  private int a(double[] paramArrayOfDouble, int paramInt1, int paramInt2, cb paramcb, boolean paramBoolean1, boolean paramBoolean2, d_ paramd_)
  {
    boolean bool = sb.e;
    int i1 = sb.d;
    double[] arrayOfDouble = new double[paramArrayOfDouble.length];
    int m = 0;
    do
    {
      do
      {
        if (m >= paramInt1) {
          break;
        }
        arrayOfDouble[m] = paramArrayOfDouble[m];
        m++;
        if (bool) {
          break label61;
        }
        if (i1 != 0) {
          break label60;
        }
      } while (i1 == 0);
    } while (bool);
    m = 0;
    label60:
    label61:
    int n = paramInt1;
    do
    {
      if (n > paramInt2) {
        break;
      }
      c_ localc_ = a(n, arrayOfDouble, paramcb, paramBoolean1, paramBoolean2, paramd_);
      arrayOfDouble[n] = localc_.j();
      if (!bool)
      {
        if (i1 != 0) {
          break label127;
        }
        m += localc_.h();
        n++;
      }
    } while (i1 == 0);
    label127:
    return m;
  }
  
  private c_ a(int paramInt, double[] paramArrayOfDouble, cb paramcb, boolean paramBoolean1, boolean paramBoolean2, d_ paramd_)
  {
    boolean bool3 = sb.e;
    int i2 = sb.d;
    int m = paramd_.a(paramInt);
    f localf = this.b.a(m);
    boolean bool1 = a(localf);
    if (!bool3) {}
    byte b1 = bool1 ? 1 : 0;
    if (!bool3) {}
    double d1 = paramBoolean2 ? 1.0E-006D : paramBoolean1 ? this.j[m] : 0.0D;
    double d2 = localf.c().a();
    double d3 = localf.c().b();
    double d4 = paramInt > 0 ? paramArrayOfDouble[(paramInt - 1)] : -1.797693134862316E+308D;
    if (!bool3)
    {
      if (d4 > d3)
      {
        if ((bool3) || ((bool1) && (d4 < d3 + 1.0E-006D))) {
          return new c_(d3, (byte)(b1 | 0x2), false);
        }
        return new c_(d4, (byte)(b1 | 0x20), false);
      }
      b1 = (byte)(b1 | 0x2);
    }
    if ((bool3) || (!paramBoolean2))
    {
      if (d2 > d4) {
        return new c_(d2, b1, true);
      }
      return new c_(d4, b1, false);
    }
    double d5 = Math.max(d4, d2);
    double d6 = -1.797693134862316E+308D;
    double d7 = -1.797693134862316E+308D;
    List localList = paramd_.d(paramInt);
    if ((bool3) || (!localList.isEmpty()))
    {
      Iterator localIterator = localList.iterator();
      do
      {
        do
        {
          double d12;
          do
          {
            if (!localIterator.hasNext()) {
              break;
            }
            int n = ((Integer)localIterator.next()).intValue();
            int i1 = paramd_.b(n);
            double d10 = paramArrayOfDouble[i1];
            if (!bool3) {
              if (d10 > d6) {
                d6 = d10;
              }
            }
            if (!bool3) {}
            d11 = paramBoolean2 ? 1.0E-006D : paramBoolean1 ? this.j[n] : 0.0D;
            d12 = d10 + Math.max(d11, d1);
          } while (d12 <= d7);
          if (bool3) {
            break label431;
          }
          if (i2 != 0) {
            break label440;
          }
          d7 = d12;
        } while (bool3);
      } while (i2 == 0);
    }
    label431:
    label440:
    double d8 = Math.max(d4, d6 + 1.0E-006D);
    if (!bool3)
    {
      if (d8 > d3) {
        return new c_(d5, b1, false);
      }
      b1 = (byte)(b1 | 0x4);
      if (bool3) {}
    }
    else
    {
      if (!paramBoolean1)
      {
        if (d2 > d8) {
          return new c_(d2, b1, true);
        }
        return new c_(d8, b1, false);
      }
      d5 = Math.max(d8, d5);
    }
    double d9 = Math.max(d4, d7);
    if (!bool3) {}
    boolean bool2 = d2 > d9;
    if (!bool3) {
      if (d9 > d3) {
        return new c_(d5, b1, false);
      }
    }
    if (!bool3)
    {
      b1 = (byte)(b1 | 0x8);
      if ((paramcb != null) && ((!bool3) && (!bool1))) {}
    }
    else
    {
      if (bool2) {
        return new c_(d2, b1, true);
      }
      return new c_(d9, b1, false);
    }
    d5 = Math.max(d9, d5);
    double d11 = paramcb.a(d5, new eb(d5, 1.7976931348623157E+308D), this.c);
    if (!bool3) {
      if (d11 > d3) {
        return new c_(d5, b1, bool2);
      }
    }
    b1 = (byte)(b1 | 0x10);
    return new c_(d11, b1, bool2);
  }
  
  private void c()
  {
    boolean bool = sb.e;
    int i2 = sb.d;
    this.f = new q();
    this.g = this.f.B();
    this.f.a("index", this.g);
    this.h = new e[this.b.c()];
    int m = 0;
    do
    {
      if (m >= this.b.c()) {
        break;
      }
      e locale1 = this.f.i();
      this.h[m] = locale1;
      if (!bool)
      {
        if (i2 != 0) {
          break label117;
        }
        this.g.a(locale1, m);
        m++;
      }
    } while (i2 == 0);
    label117:
    eb[] arrayOfeb = new eb[this.b.c()];
    int n = 0;
    label222:
    do
    {
      if (n >= this.b.c()) {
        break;
      }
      eb localeb = this.b.a(n).b();
      arrayOfeb[n] = localeb;
      e locale2 = this.h[n];
      int i1 = 0;
      do
      {
        do
        {
          if (i1 >= n) {
            break label222;
          }
          if (i2 != 0) {
            break;
          }
          if (localeb.b(arrayOfeb[i1]) < 1.0E-006D)
          {
            e locale3 = this.h[i1];
            this.f.a(locale3, locale2);
          }
          i1++;
        } while (i2 == 0);
        n++;
      } while (bool);
    } while (i2 == 0);
  }
  
  private static ab a(pc parampc)
  {
    boolean bool = sb.e;
    int m = sb.d;
    ab localab = new ab();
    Iterator localIterator = parampc.b().iterator();
    do
    {
      if (!localIterator.hasNext()) {
        break;
      }
      f localf = (f)localIterator.next();
      if (!bool)
      {
        if (m != 0) {
          break label72;
        }
        localab.add(localf.i());
      }
    } while (m == 0);
    label72:
    return localab;
  }
  
  public void d()
  {
    boolean bool = sb.e;
    int i3 = sb.d;
    f_ localf_ = b(true);
    double[] arrayOfDouble1 = a(localf_);
    double[] arrayOfDouble2 = b(localf_);
    double[] arrayOfDouble3 = new double[this.b.c()];
    int m = 0;
    label156:
    do
    {
      if (m >= this.b.c()) {
        break;
      }
      double d1 = arrayOfDouble2[m] - arrayOfDouble1[m];
      if (i3 != 0) {
        break label182;
      }
      if (d1 < 0.0D)
      {
        if (!bool)
        {
          if (-d1 < 1.0E-006D)
          {
            arrayOfDouble2[m] = arrayOfDouble1[m];
            d1 = 0.0D;
          }
        }
        else
        {
          if (bool) {
            continue;
          }
          if (i3 == 0) {
            break label156;
          }
        }
        eb localeb1 = this.b.a(m).c();
        arrayOfDouble1[m] = localeb1.a();
        arrayOfDouble2[m] = localeb1.b();
        d1 = arrayOfDouble2[m] - arrayOfDouble1[m];
      }
      arrayOfDouble3[m] = Math.max(0.0D, d1);
      m++;
    } while (i3 == 0);
    label182:
    g.a_[] arrayOfa_ = new g.a_[this.b.c()];
    g localg = a(arrayOfDouble3, arrayOfa_);
    label254:
    do
    {
      double[] arrayOfDouble5;
      int i2;
      do
      {
        do
        {
          if (localg.d()) {
            break;
          }
          g.a_ locala_ = localg.c();
          localg.a(locala_);
          int n = ((Integer)locala_.b()).intValue();
          arrayOfa_[n] = null;
          double d2 = a(n, arrayOfDouble1, arrayOfDouble2, arrayOfDouble3);
          f localf = this.b.a(n);
          double d3 = a(n, d2, arrayOfDouble1, arrayOfDouble2, localf_);
          eb localeb2 = localf.c();
          if (!bool) {}
          do
          {
            if (localeb2.a() <= d3 + 1.0E-006D)
            {
              if (bool) {
                break label363;
              }
              if (localeb2.b() + 1.0E-006D >= d3) {}
            }
            else
            {
              d3 = localeb2.c();
            }
            this.b.a(localf, d3);
            tmp347_345 = d3;
            arrayOfDouble2[n] = tmp347_345;
            arrayOfDouble1[n] = tmp347_345;
            arrayOfDouble3[n] = 0.0D;
            double[] arrayOfDouble4 = new double[this.b.c()];
            int i1 = 0;
            do
            {
              do
              {
                if (i1 >= this.b.c()) {
                  break;
                }
                arrayOfDouble4[i1] = arrayOfDouble2[i1];
                i1++;
                if ((!bool) && (i3 != 0)) {
                  break label531;
                }
              } while (i3 == 0);
            } while (bool);
            if (!bool)
            {
              if (n > 0) {
                a(arrayOfDouble4, n - 1, localf_);
              }
            }
            else
            {
              i1 = 0;
              do
              {
                if (i1 >= n) {
                  break;
                }
                if (bool) {
                  break label545;
                }
                if (i3 != 0) {
                  break label543;
                }
                if (arrayOfDouble4[i1] < arrayOfDouble2[i1])
                {
                  arrayOfDouble2[i1] = arrayOfDouble4[i1];
                  arrayOfDouble2[i1] -= arrayOfDouble1[i1];
                  if (bool) {
                    continue;
                  }
                  if (arrayOfa_[i1] != null) {
                    localg.b(arrayOfa_[i1], new Integer(i1));
                  }
                }
                i1++;
              } while (i3 == 0);
            }
            if (bool) {
              break label254;
            }
            arrayOfDouble5 = new double[this.b.c()];
            i2 = 0;
            do
            {
              do
              {
                if (i2 >= this.b.c()) {
                  break label589;
                }
                arrayOfDouble5[i2] = arrayOfDouble1[i2];
                i2++;
                if ((!bool) && (i3 != 0)) {
                  break;
                }
              } while (i3 == 0);
            } while (bool);
            if (n >= this.b.c() - 1) {
              break;
            }
            c(arrayOfDouble5, n + 1, localf_);
          } while (bool);
          i2 = n + 1;
        } while (i2 >= this.b.c());
      } while (i3 != 0);
      if (arrayOfDouble5[i2] > arrayOfDouble1[i2])
      {
        arrayOfDouble1[i2] = arrayOfDouble5[i2];
        arrayOfDouble2[i2] -= arrayOfDouble1[i2];
        if (bool) {
          continue;
        }
        if (arrayOfa_[i2] != null) {
          localg.b(arrayOfa_[i2], new Integer(i2));
        }
      }
      i2++;
    } while (i3 == 0);
    label363:
  }
  
  private void e()
  {
    boolean bool = sb.e;
    int n = sb.d;
    this.j = new double[this.b.c()];
    do
    {
      for (int m = 0; n == 0; m++)
      {
        if (m >= this.b.c()) {
          break;
        }
        this.j[m] = this.b.a(m).n();
      }
    } while (bool);
  }
  
  private static boolean a(f paramf)
  {
    boolean bool = sb.e;
    if (!bool) {
      if (!paramf.f()) {
        if (bool) {
          break label27;
        }
      }
    }
    label27:
    return paramf.o();
  }
  
  private double[] a(f_ paramf_)
  {
    boolean bool = sb.e;
    int n = sb.d;
    double[] arrayOfDouble = new double[this.b.c()];
    do
    {
      for (int m = 0; n == 0; m++)
      {
        if (m >= this.b.c()) {
          break;
        }
        if ((!bool) && (n != 0)) {
          break label69;
        }
        arrayOfDouble[m] = paramf_.f[m].j();
      }
    } while (bool);
    label69:
    return arrayOfDouble;
  }
  
  private double[] b(f_ paramf_)
  {
    double[] arrayOfDouble = new double[this.b.c()];
    a(arrayOfDouble, arrayOfDouble.length - 1, paramf_);
    return arrayOfDouble;
  }
  
  private void a(double[] paramArrayOfDouble, int paramInt, f_ paramf_)
  {
    boolean bool = sb.e;
    int n = sb.d;
    int m = paramInt;
    label175:
    label181:
    do
    {
      if (m < 0) {
        break;
      }
      c_ localc_ = paramf_.f[m];
      if (!bool)
      {
        if (localc_.c()) {
          paramArrayOfDouble[m] = this.b.a(m).c().b();
        }
      }
      else
      {
        if (bool) {
          continue;
        }
        if (n == 0) {
          break label181;
        }
      }
      double d1 = 1.7976931348623157E+308D;
      if (!bool)
      {
        if (m < this.b.c() - 1)
        {
          d1 = paramArrayOfDouble[(m + 1)];
          d1 = c(m, d1, paramArrayOfDouble, paramf_);
        }
        if (!bool) {
          d1 = Math.min(d1, this.b.a(m).c().b());
        }
      }
      else
      {
        if (!localc_.g()) {
          break label175;
        }
      }
      d1 = this.d.a(d1, new eb(-1.797693134862316E+308D, d1), this.c);
      paramArrayOfDouble[m] = d1;
      m--;
    } while (n == 0);
  }
  
  private void c(double[] paramArrayOfDouble, int paramInt, f_ paramf_)
  {
    boolean bool = sb.e;
    int n = sb.d;
    int m = paramInt;
    label173:
    label179:
    do
    {
      if (m >= this.b.c()) {
        break;
      }
      c_ localc_ = paramf_.f[m];
      if (!bool)
      {
        if (localc_.c()) {
          paramArrayOfDouble[m] = this.b.a(m).c().a();
        }
      }
      else
      {
        if (bool) {
          continue;
        }
        if (n == 0) {
          break label179;
        }
      }
      double d1 = -1.797693134862316E+308D;
      if (!bool)
      {
        if (m > 0)
        {
          d1 = paramArrayOfDouble[(m - 1)];
          d1 = a(m, d1, paramArrayOfDouble, paramf_);
        }
        if (!bool) {
          d1 = Math.max(d1, this.b.a(m).c().a());
        }
      }
      else
      {
        if (!localc_.g()) {
          break label173;
        }
      }
      d1 = this.d.a(d1, new eb(d1, 1.7976931348623157E+308D), this.c);
      paramArrayOfDouble[m] = d1;
      m++;
    } while (n == 0);
  }
  
  private double a(int paramInt, double paramDouble, double[] paramArrayOfDouble, f_ paramf_)
  {
    boolean bool2 = sb.e;
    int n = sb.d;
    boolean bool1 = paramf_.f[paramInt].f();
    if (!bool1) {
      return paramDouble;
    }
    double d1 = this.j[paramInt];
    List localList = this.k.d(paramInt);
    Iterator localIterator = localList.iterator();
    do
    {
      if (!localIterator.hasNext()) {
        break;
      }
      int m = ((Integer)localIterator.next()).intValue();
      double d2 = paramArrayOfDouble[m] + Math.max(d1, this.j[m]);
      if (!bool2)
      {
        if (n != 0) {
          break label124;
        }
        paramDouble = Math.max(paramDouble, d2);
      }
    } while (n == 0);
    label124:
    return paramDouble;
  }
  
  private double c(int paramInt, double paramDouble, double[] paramArrayOfDouble, f_ paramf_)
  {
    boolean bool = sb.e;
    int n = sb.d;
    double d1 = this.j[paramInt];
    List localList = this.k.e(paramInt);
    Iterator localIterator = localList.iterator();
    do
    {
      do
      {
        int m;
        do
        {
          if (!localIterator.hasNext()) {
            break;
          }
          m = ((Integer)localIterator.next()).intValue();
        } while (!paramf_.f[m].f());
        double d2 = paramArrayOfDouble[m] - Math.max(d1, this.j[m]);
        if (!bool)
        {
          if ((bool) || (n != 0)) {
            break label129;
          }
          paramDouble = Math.min(paramDouble, d2);
        }
      } while (bool);
    } while (n == 0);
    label129:
    return paramDouble;
  }
  
  private g a(double[] paramArrayOfDouble, g.a_[] paramArrayOfa_)
  {
    boolean bool = sb.e;
    int n = sb.d;
    g localg = new g(this.b.c(), new Comparator()
    {
      private final double[] val$minMaxLocations;
      
      public int compare(Object paramAnonymousObject1, Object paramAnonymousObject2)
      {
        boolean bool = sb.e;
        int i = ((Integer)paramAnonymousObject1).intValue();
        int j = ((Integer)paramAnonymousObject2).intValue();
        double d1 = this.val$minMaxLocations[i];
        double d2 = this.val$minMaxLocations[j];
        if (!bool) {
          if (d1 < d2) {
            return -1;
          }
        }
        if (!bool) {
          if (d1 > d2) {
            return 1;
          }
        }
        return 0;
      }
    });
    int m = 0;
    do
    {
      while (n == 0)
      {
        if (m >= this.b.c()) {
          break;
        }
        paramArrayOfa_[m] = localg.a(new Integer(m), this.b.a(m));
        m++;
      }
    } while (bool);
    return localg;
  }
  
  private double a(int paramInt, double[] paramArrayOfDouble1, double[] paramArrayOfDouble2, double[] paramArrayOfDouble3)
  {
    boolean bool = sb.e;
    int i8 = sb.d;
    double d1 = paramArrayOfDouble1[paramInt];
    int m = paramInt;
    int n = paramInt - 1;
    if (n >= 0)
    {
      d1 = paramArrayOfDouble1[n];
      m = n;
    }
    while (bool)
    {
      if (bool) {
        break label76;
      }
      if (i8 != 0) {
        break label75;
      }
      if (paramArrayOfDouble3[n] > 1.0E-006D)
      {
        n--;
        if (i8 == 0) {
          break;
        }
      }
    }
    label75:
    label76:
    int i1 = n == -1 ? 1 : 0;
    double d2 = paramArrayOfDouble2[paramInt];
    int i2 = paramInt;
    int i3 = paramInt + 1;
    if (i3 < this.b.c())
    {
      d2 = paramArrayOfDouble2[i3];
      i2 = i3;
    }
    while (bool)
    {
      if (bool) {
        break label165;
      }
      if (i8 != 0) {
        break label158;
      }
      if (paramArrayOfDouble3[i3] > 1.0E-006D)
      {
        i3++;
        if (i8 == 0) {
          break;
        }
      }
    }
    label158:
    label165:
    int i4 = i3 == this.b.c() ? 1 : 0;
    int[] arrayOfInt = new int[this.b.c()];
    int i5 = m;
    if (i5 <= i2) {}
    label287:
    double d3;
    double d4;
    do
    {
      m localm = this.h[i5].m();
      do
      {
        do
        {
          if (!localm.e()) {
            break label287;
          }
          int i7 = this.g.getInt(((d)localm.j()).e());
          if (i8 != 0) {
            break;
          }
          if (i7 >= m) {
            arrayOfInt[i5] = Math.max(arrayOfInt[i5], arrayOfInt[i7] + 1);
          }
          localm.f();
        } while (i8 == 0);
      } while (bool);
      if (!bool)
      {
        if (i5 > 0) {
          arrayOfInt[i5] = Math.max(arrayOfInt[i5], arrayOfInt[(i5 - 1)]);
        }
        i5++;
      }
      if (i8 == 0) {
        break;
      }
      i5 = arrayOfInt[i2];
      int i6 = arrayOfInt[paramInt];
      d3 = i5;
      d4 = i6;
    } while (bool);
    if (!bool)
    {
      if (this.a)
      {
        d3 += (i1 != 0 ? 0.5D : 0.0D);
        d3 += (i4 != 0 ? 0.5D : 0.0D);
        d4 += (i1 != 0 ? 0.5D : 0.0D);
      }
      if (bool) {}
    }
    else if (d3 == 0.0D)
    {
      if (bool) {
        break label465;
      }
      d5 = d1 + (d2 - d1) / 2.0D;
      if (i8 == 0) {
        break label477;
      }
    }
    label465:
    double d6 = (d2 - d1) / d3;
    double d5 = d1 + d6 * d4;
    label477:
    return d5;
  }
  
  private double a(int paramInt, double paramDouble, double[] paramArrayOfDouble1, double[] paramArrayOfDouble2, f_ paramf_)
  {
    boolean bool = sb.e;
    c_ localc_ = paramf_.f[paramInt];
    eb localeb = new eb(paramArrayOfDouble1[paramInt], paramArrayOfDouble2[paramInt]);
    if (localc_.g()) {
      return this.d.a(paramDouble, localeb, this.c);
    }
    double d1 = localeb.c(paramDouble);
    double d2 = a(paramInt, d1, paramArrayOfDouble1, paramf_);
    double d3 = c(paramInt, d1, paramArrayOfDouble2, paramf_);
    if (!bool)
    {
      if (d3 >= d2) {
        localeb = new eb(d2, d3);
      }
    }
    else {
      d1 = localeb.c(d1);
    }
    if ((this.d != null) && ((bool) || (!localc_.c())))
    {
      int m = this.d.a(localeb, this.c, 2);
      if (m >= 0) {
        return this.d.a(d1, localeb, this.c, m);
      }
    }
    return d1;
  }
  
  public static void a(i parami, qb paramqb)
  {
    boolean bool2 = sb.e;
    int i3 = sb.d;
    boolean bool1 = parami.d();
    cb localcb = paramqb.c().m();
    int m = parami.c();
    int n = m - 1;
    f localf1;
    double d1;
    double d2;
    f localf2;
    double d5;
    double d6;
    label165:
    double d7;
    do
    {
      if (n < 0) {
        break;
      }
      localf1 = parami.a(n);
      if (i3 != 0) {
        break label308;
      }
      if (localf1.d() == 1)
      {
        d1 = localf1.c().b();
        d2 = a(localf1, paramqb);
        int i1 = n + 1;
        do
        {
          if (i1 >= m) {
            break label165;
          }
          localf2 = parami.a(i1);
          d5 = a(localf2, paramqb);
          d6 = Math.max(d2, d5);
          if (i3 != 0) {
            break;
          }
          if (localf1.b().b(localf2.b()) == 0.0D) {
            d1 = Math.min(d1, parami.b(localf2) - d6);
          }
          i1++;
        } while (i3 == 0);
        double d3 = parami.b(localf1);
        d5 = Math.min(d3, d1);
        d6 = Math.max(d3, d1);
        if (bool2) {
          break label467;
        }
        d7 = (localcb != null) && ((bool2) || (!a(localf1))) ? d3 : (bool2) || (localcb.a(new eb(d5, d6), bool1)) ? localcb.a(d1, new eb(d3, d1), bool1) : d1;
        if (bool2) {
          continue;
        }
        if (d7 > d3) {
          parami.a(localf1, d7);
        }
      }
      n--;
    } while (i3 == 0);
    if (!bool2) {
      n = 0;
    }
    label308:
    label467:
    do
    {
      if (n >= m) {
        break;
      }
      localf1 = parami.a(n);
      if (!bool2)
      {
        if (localf1.d() == -1)
        {
          d1 = localf1.c().a();
          d2 = a(localf1, paramqb);
          int i2 = n - 1;
          do
          {
            if (i2 < 0) {
              break label435;
            }
            localf2 = parami.a(i2);
            d5 = a(localf2, paramqb);
            d6 = Math.max(d2, d5);
            if (i3 != 0) {
              break;
            }
            if (localf1.b().b(localf2.b()) < d6) {
              d1 = Math.max(d1, parami.b(localf2) + d6);
            }
            i2--;
          } while (i3 == 0);
          double d4 = parami.b(localf1);
          d5 = Math.min(d4, d1);
          d6 = Math.max(d4, d1);
          if (bool2) {
            break;
          }
          if (localcb != null) {}
          d7 = (bool2) || (!a(localf1)) ? d4 : (bool2) || (localcb.a(new eb(d5, d6), bool1)) ? localcb.a(d1, new eb(d4, d1), bool1) : d1;
          if (bool2) {
            continue;
          }
          if (d7 < d4) {
            parami.a(localf1, d7);
          }
        }
        n++;
      }
    } while (i3 == 0);
    label435:
  }
  
  private static double a(f paramf, qb paramqb)
  {
    a locala = paramqb.c();
    if (!sb.e) {}
    return paramf.i() != null ? locala.a(paramf.i()).c() : a(a(paramf.l()), paramqb);
  }
  
  private static double a(ab paramab, qb paramqb)
  {
    boolean bool = sb.e;
    int m = sb.d;
    double d1 = 0.0D;
    a locala = paramqb.c();
    m localm = paramab.l();
    do
    {
      if (!localm.e()) {
        break;
      }
      d locald = localm.a();
      if (!bool)
      {
        if (m != 0) {
          break label81;
        }
        d1 = Math.max(d1, locala.a(locald).c());
        localm.f();
      }
    } while (m == 0);
    label81:
    return d1;
  }
  
  static class b_
  {
    int a;
    int b;
    int c;
    int d;
    
    b_(int paramInt1, int paramInt2, int paramInt3, int paramInt4)
    {
      this.a = paramInt1;
      this.b = paramInt2;
      this.c = paramInt3;
      this.d = paramInt4;
    }
    
    boolean a()
    {
      boolean bool = sb.e;
      if (!bool) {
        if (this.b == -1) {
          if (bool) {
            break label29;
          }
        }
      }
      label29:
      return this.d != -1;
    }
  }
  
  class e_
    extends nc.d_
  {
    private final int[] a;
    private final int[] b;
    
    e_(int paramInt1, int paramInt2)
    {
      super();
      if (!bool) {}
      int i = paramInt1 > paramInt2 ? 1 : 0;
      this.a = new int[nc.this.b.c()];
      this.b = new int[nc.this.b.c()];
      int j = 0;
      if (j < nc.this.b.c())
      {
        if (!bool) {
          if (j < paramInt1)
          {
            if (bool) {
              break label142;
            }
            if (j < paramInt2) {
              break label122;
            }
          }
        }
        if (!bool)
        {
          if (j > paramInt1)
          {
            if (bool) {
              break label158;
            }
            if (j > paramInt2)
            {
              label122:
              this.a[j] = j;
              this.b[j] = j;
              label142:
              if (bool) {
                break label233;
              }
              if (k == 0) {
                break label228;
              }
            }
          }
          if (bool) {
            break label233;
          }
        }
        if (j != paramInt1)
        {
          label158:
          if (bool) {
            break label233;
          }
          if (j == paramInt2) {}
        }
      }
      label228:
      label233:
      while (bool)
      {
        if (!bool) {}
        this.a[j] = (i != 0 ? j - 1 : j + 1);
        if (!bool) {}
        this.b[j] = (i != 0 ? j + 1 : j - 1);
        j++;
        if (k == 0) {
          break;
        }
      }
      if (!bool) {}
      this.a[paramInt1] = (i != 0 ? paramInt1 - 1 : paramInt1 + 1);
      this.b[paramInt1] = paramInt2;
      this.a[paramInt2] = paramInt1;
      if (!bool) {}
      this.b[paramInt2] = (i != 0 ? paramInt2 + 1 : paramInt2 - 1);
    }
    
    public int a(int paramInt)
    {
      return this.a[paramInt];
    }
    
    public int b(int paramInt)
    {
      return this.b[paramInt];
    }
  }
  
  class d_
  {
    d_() {}
    
    public int a(int paramInt)
    {
      return paramInt;
    }
    
    public int b(int paramInt)
    {
      return paramInt;
    }
    
    public List d(int paramInt)
    {
      return a(paramInt, true);
    }
    
    public List e(int paramInt)
    {
      return a(paramInt, false);
    }
    
    private List a(int paramInt, boolean paramBoolean)
    {
      boolean bool = sb.e;
      int m = sb.d;
      z localz = null;
      int i = a(paramInt);
      e locale1 = nc.this.h[i];
      m localm = locale1.l();
      if (localm.e()) {}
      label201:
      while (bool)
      {
        d locald = (d)localm.j();
        if (m != 0) {
          return localz;
        }
        if (!bool) {}
        e locale2 = locald.e() != locale1 ? locald.e() : locald.f();
        int j = nc.this.g.getInt(locale2);
        int k = b(j);
        if ((bool) || ((!paramBoolean) || ((bool) || (k >= paramInt))))
        {
          if (bool) {
            break label201;
          }
          if (!paramBoolean)
          {
            if (bool) {
              break label201;
            }
            if (k <= paramInt) {}
          }
        }
        else
        {
          if (!bool) {
            if (localz == null) {
              localz = new z();
            }
          }
          localz.add(new Integer(j));
        }
        localm.f();
        if (m == 0) {
          break;
        }
      }
      if (!bool) {
        if (localz == null) {
          return Collections.EMPTY_LIST;
        }
      }
      return localz;
    }
  }
  
  static class c_
  {
    static final byte a = 32;
    static final byte c = 1;
    static final byte d = 2;
    static final byte e = 4;
    static final byte g = 8;
    static final byte h = 16;
    private final double j;
    private final byte k;
    private final int l;
    private final boolean m;
    
    c_(double paramDouble, byte paramByte, boolean paramBoolean)
    {
      this.j = paramDouble;
      this.k = paramByte;
      if (!bool) {}
      if (!bool) {}
      if (!bool) {}
      if (!bool) {}
      this.l = (e() ? 10 : f() ? 15 : g() ? 16 : a() ? -1000 : 0);
      this.m = paramBoolean;
    }
    
    public boolean a()
    {
      if (!sb.e) {}
      return (this.k & 0x20) != 0;
    }
    
    public boolean c()
    {
      if (!sb.e) {}
      return (this.k & 0x1) != 0;
    }
    
    public boolean d()
    {
      if (!sb.e) {}
      return (this.k & 0x2) != 0;
    }
    
    public boolean e()
    {
      if (!sb.e) {}
      return (this.k & 0x4) != 0;
    }
    
    public boolean f()
    {
      if (!sb.e) {}
      return (this.k & 0x8) != 0;
    }
    
    public boolean g()
    {
      if (!sb.e) {}
      return (this.k & 0x10) != 0;
    }
    
    public int h()
    {
      return this.l;
    }
    
    public boolean i()
    {
      return this.m;
    }
    
    public double j()
    {
      return this.j;
    }
  }
  
  static class f_
  {
    boolean a;
    int b;
    int c;
    final z d;
    final nc.c_[] f;
    
    f_(nc.c_[] paramArrayOfc_, int paramInt1, int paramInt2, boolean paramBoolean, z paramz)
    {
      this.f = paramArrayOfc_;
      this.b = paramInt2;
      this.a = paramBoolean;
      this.d = paramz;
      this.c = paramInt1;
    }
    
    public boolean a(f_ paramf_)
    {
      boolean bool = sb.e;
      if (!bool) {
        if (this.c > paramf_.c) {
          return true;
        }
      }
      if (!bool) {
        if (this.c < paramf_.c) {
          return false;
        }
      }
      if (!bool) {
        if (this.b > paramf_.b) {
          return true;
        }
      }
      if (!bool)
      {
        if (this.b < paramf_.b) {
          return false;
        }
        if (bool) {
          break label94;
        }
      }
      label94:
      return this.d.size() < paramf_.d.size();
    }
    
    public boolean a()
    {
      boolean bool = sb.e;
      int i = sb.d;
      Iterator localIterator = this.d.iterator();
      while (localIterator.hasNext())
      {
        nc.b_ localb_ = (nc.b_)localIterator.next();
        if (localb_.a())
        {
          if ((bool) || (i != 0)) {
            break label55;
          }
          return true;
        }
      }
      label55:
      return false;
    }
    
    public boolean b()
    {
      return this.a;
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.l.a.nc

 * JD-Core Version:    0.7.0.1

 */